package com.baizhi.controller;


import com.baizhi.entity.Student;
import com.baizhi.service.IStudentService;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author longyang
 * @since 2022-01-11
 */
@RestController
@RequestMapping("/student")
public class StudentController {
    @Autowired
    private IStudentService studentService;
    @GetMapping("studenAll")
    public IPage<Student> studenAll(int pageNum, int pageSize){
        Page page = new Page(pageNum, pageSize);
        IPage iPage = studentService.pageMaps(page);
        return iPage;
    }
}

